﻿<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>登录程序之表单页面</title>
</head>
<body>
<%
	String userId = "";
	String password = "";
	Cookie[] cookies = request.getCookies();
	if(cookies != null){
		for(int i=0; i<cookies.length; i++){
			if (cookies[i].getName().equals("Cookie2019")) {
		           //如果cookie对象的名称为Cookie2019
				userId = cookies[i].getValue().split("#")[0];  //获取用户名
				password = cookies[i].getValue().split("#")[1];  //获取登录时间
			}
		}
	}
%>

<center>
  <h1>登录操作</h1>
  <hr>
  <form action="login_check.jsp" method="post">
    <table border="1">
      <tr>
        <td colspan="2" align="center">用户登录</td>   
      </tr>
      <tr>
        <td>登录ID：</td>
        <td><input type="text" name="id" value="<%=userId %>"></td>
      </tr>
      <tr>
        <td>登录密码：</td>
        <td><input type="password" name="password" value="<%=password %>"></td>
      </tr>
      <tr>
        <td colspan="2">
          &nbsp;&nbsp;<input type="submit" value="登录">&nbsp;&nbsp;
          <input type="reset" value="重置">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="checkbox" name="remember" checked>记住我	 
        </td>   
      </tr>
    </table>
  </form>
   <h5>如果尚未注册，请先点击<a href="register.jsp">这里</a>进行注册！</h5>
</center>
</body>